﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WarOfDev.EF;
using WarOfDev.Core.Common;

namespace WarOfDev.Services.Task
{
    public class TaskService
    {
        private WarDevEntities db;

        public TaskService()
        {
            db = new WarDevEntities();
        }

        public bool Update(EF.Task task)
        {

            return true;
            //if (task.Status == (int)EnumTaskStatus.Closed)
            //{
            //    EF.Developer Onwer = new EF.Developer() { Id = task.Assignment.ToList()[0].DevId };
            //    db.Attach(Onwer);

            //    Onwer.ExperienceValue += task.ExperienceValue;   
            //}

            //task.Assignment.ToList().ForEach(db.ObjectStateManager.ChangeObjectState(

            //db.SaveChanges();
            //return true;
        }
        
    }
}
